package Text.Text002;

public class Master {
    private String name;

//    主人喂养宠物
    public void feed(Pet pet){
        System.out.println(name + "z正在喂" + pet.name);
        pet.eat();
    }

//    构造方法
    public Master(String name) {
        this.name = name;
    }

    public Master() {
    }

//    set、get
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
